﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Collections;

namespace API.Models
{
    public class User
    {
        public string UserName { get; set; }
        public string Password { get; set; }
        public string UserToken { get; set; }

        public User(string uname, string pwd)
        {
            this.UserName = uname;
            this.Password = pwd;
        }
    }

    public class UserAuthenticationRequest
    {
        public string Username { get; set; }
        public string Password { get; set; }
    }

    public class UserAuthenticationResponse
    {
        public DataTable UserData { get; set; }        
        public long LoginID { get; set; }
        public bool IsAuthenticated { get; set; }
        public string UserToken { get; set; }
        public string ErrorMessage { get; set; }

        public string UserFirstName { get; set; }
        public string UserLastName { get; set; }
        public bool IsController { get; set; }
        public string PhysicianID { get; set; }

        public UserAuthenticationResponse()
        {
            this.IsAuthenticated = true;
            this.ErrorMessage = "Testing Authentication";
            this.IsController = false;
        }
    }

    public class AddReferralPatientDetailsRequest
    {
        public string PatientFirstName { get; set; }
        public string PatientLastName { get; set; }
        public DateTime DOB { get; set; }
        public string AddrLine1 { get; set; }
        public string AddrLine2 { get; set; }
        public string State { get; set; }
        public string ZipCode { get; set; }
        public string PhoneNumber { get; set; }
        public string PhoneType { get; set; }
        public string Email { get; set; }
        public string Insurance { get; set; }
        public string PlanNumber { get; set; }
        public string Insurance1 { get; set; }
        public string PlanNumber1 { get; set; }
        public string Notes { get; set; }
        public string ReferralPhysician { get; set; }
        public string PhysicianID { get; set; }
        public int PatientID { get; set; }

        public string RequestedPractice { get; set; }

        public string PreferredPhysician { get; set; }
        public string LoginID { get; set; }

        public string RefReason { get; set; }

        public bool IsUrgentRequest { get; set; }
        public string PrefPhone { get; set; }
        public bool EstablishedPatient { get; set; }

        public bool PPGPhysician { get; set; }

        public DataRow PatientDemographics { get; set; }

        public AddReferralPatientDetailsRequest()
        {
            this.PatientID = 0;
            this.IsUrgentRequest = false;
            this.EstablishedPatient = false;
            this.PPGPhysician = false;
        }


    }

    public class AddReferralPatientDetailsResponse
    {

        public string SaveStatus { get; set; }
        public string ErrorMessage { get; set; }
    }

    public class SearchListRequest
    {
        public string LoginID { get; set; }
        public string SearchText { get; set; }
    }

    public class ReferralByIDRequest
    {
        public string LoginID { get; set; }
        public string ReferralID { get; set; }
    }

    public class AddReferralDiagonsisRequest
    {
        public string ReferralID { get; set; }
        public string DiagnosisIDs { get; set; }
        public string DiagnosisNotes { get; set; }

    }

    public class AddReferralDiagonsisResponse
    {
        public DataTable PatientDiagnosis { get; set; }
        public string ErrorMessage { get; set; }
        public object[] ChipData { get; set; }

    }

    public class FilterDiagnosisRequest
    {
        public int ReferralID { get; set; }
        public string SearchText { get; set; }

    }

    public class AddReferralProcessRequest
    {
        public string Practice { get; set; }
        public string PreferredPhysician { get; set; }
        public string Physician { get; set; }
        public string AcceptanceStatus { get; set; }
        public string AcceptanceNotes { get; set; }
        public bool ScheduleStatus { get; set; }
        public string ScheduleNotes { get; set; }
        public bool VisitStatus { get; set; }
        public string VisitNotes { get; set; }
        public int ReferralID { get; set; }
        public string ErrorMessage { get; set; }

        public string LoginID { get; set; }
        public string AcceptanceTime { get; set; }
        public string AcceptanceUpdatedBy { get; set; }

        public string ScheduleUpdatedBy { get; set; }
        public string ScheduleTime { get; set; }
        public string  VisitTime { get; set; }
        public string VisitUpdatedBy { get; set; }
        public string AssignedBy { get; set; }
        public string AssignedTime { get; set; }
        public string CreatedBy { get; set; }
        public string CreatedDate { get; set; }
        public string AppointmentDate { get; set; }
        public string AppointmentTime { get; set; }
        public bool NoteStatus { get; set; }
        public string NoteUpdatedBy { get; set; }
        public string NoteUpdatedTime { get; set; }
        public string NoteSentDate { get; set; }

        public string PrefPhone { get; set; }
        public string EstablishedPatient { get; set; }
        public string PPGPhysician { get; set; }
        public AddReferralProcessRequest()
        {
            this.AcceptanceStatus = null;
        }
    }
    public class AddReferralProcessResponse
    {
        public string SaveStauts { get; set; }
        public string ErrorMessage { get; set; }
    }

    public class UserReferralResponse
    {
        public DataTable ReferralCategories { get; set; }
        public DataTable NewRequests { get; set; }
        public DataTable InProcessRequests { get; set; }
        public DataTable CompletedRequests { get; set; }
        public DataTable ScheduledRequests { get; set; }
        public string ErrorMessage { get; set; }

        public ArrayList WeeklyStats { get; set; }
        public ArrayList DailyPracticeSplit { get; set; }
        public ArrayList DailyReferralInStat { get; set; }
        public ArrayList DailyReferralOutStat { get; set; }

        public ArrayList YesterdayPracticeSplit { get; set; }
        public ArrayList YesterdayReferralInStat { get; set; }
        public ArrayList YesterdayReferralOutStat { get; set; }

        public ArrayList WeeklyPracticeSplit { get; set; }
        public ArrayList WeeklyReferralInStat { get; set; }
        public ArrayList WeeklyReferralOutStat { get; set; }

        public ArrayList MonthlyPracticeSplit { get; set; }
        public ArrayList MonthlyReferralInStat { get; set; }
        public ArrayList MonthlyReferralOutStat { get; set; }

        public ArrayList PreviousMonthlyPracticeSplit { get; set; }
        public ArrayList PreviousMonthlyReferralInStat { get; set; }
        public ArrayList PreviousMonthlyReferralOutStat { get; set; }

        public UserReferralResponse()
        {
            this.WeeklyStats = new ArrayList();
            this.DailyPracticeSplit = new ArrayList();
            this.DailyReferralInStat = new ArrayList();
            this.DailyReferralOutStat = new ArrayList();

            this.YesterdayPracticeSplit = new ArrayList();
            this.YesterdayReferralInStat = new ArrayList();
            this.YesterdayReferralOutStat = new ArrayList();

            this.WeeklyPracticeSplit = new ArrayList();
            this.WeeklyReferralInStat = new ArrayList();
            this.WeeklyReferralOutStat = new ArrayList();

            this.MonthlyPracticeSplit = new ArrayList();
            this.MonthlyReferralInStat = new ArrayList();
            this.MonthlyReferralOutStat = new ArrayList();


            this.PreviousMonthlyPracticeSplit = new ArrayList();
            this.PreviousMonthlyReferralInStat = new ArrayList();
            this.PreviousMonthlyReferralOutStat = new ArrayList();
        }

    }

    public class ReferralListRequest
    {
        public int LoginID { get; set; }
        public string ReferralType { get; set; }
        public string PracticeName { get; set; }

    }

    public class ReferralListResponse
    {
        public DataTable ReferralList { get; set; }
        public string ErrorMessage { get; set; }
    }

    public class DefaultListResponse
    {
        public DataTable Practices { get; set; }
        public DataTable Physicians { get; set; }
        public DataTable DiagnosisList { get; set; }
        public DataTable StateList { get; set; }
        public DataTable ReferringPhysicians { get; set; }

    }

    public class UserForgotPasswordRequest
    {
        public string UserName { get; set; }
        public string NewPassword { get; set; }
        public string SecretAnswer { get; set; }
    }

    public class UserForgotPasswordResponse
    {
        public string SecretQuestion { get; set; }
        public string ErrorMsg { get; set; }

    }

    public class UserChangePasswordRequest
    {
        public string UserName { get; set; }
        public string CurrentPassword { get; set; }
        public string NewPassword { get; set; }
    }

    public class UserChangePasswordResponse
    {
        public string StatusMsg { get; set; }

    }

    public class NewUserRequest
    {
        public string UserName { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string UserType { get; set; }
        public string SecretQn { get; set; }
        public string SecretAns { get; set; }
        public string Password { get; set; }
    }

    public class NewUserResponse
    {
        public string StatusMsg { get; set; }

    }

    public class ReferralLogResponse
    {
        public DataTable LogMsg { get; set; }
        public string ErrorMessage { get; set; }
    }

    public class DeleteReferralRequest
    {
        public long ReferralID { get; set; }
        public long LoginID { get; set; }
    }

    public class AdvancedSearchRequest
    {
        public long LoginID { get; set; }
        public string FromDate { get; set; }
        public string ToDate { get; set; }
        public string ReferralType { get; set; }
        public string ReferralStatus { get; set; }
        public string FromPractice { get; set; }
        public string ToPractice { get; set; }
        public string FromPhysician { get; set; }
        public string ToPhysician { get; set; }
    }

    public class AdvancedSearchResponse
    {
        public DataTable SearchResponse;
        public string ErrorMessage { get; set; }

    }
}